#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdio>

using namespace std;

int main() 
{
	int n, m;
	while(cin >> n >> m) 
	{
		cout << m * n - 1 << endl;
	}
	return 0;
}